package com.example.agrigreennewssys.service.impl;


import com.example.agrigreennewssys.dao.UserProfileMapper;
import com.example.agrigreennewssys.entity.UserProfile;
import com.example.agrigreennewssys.service.UserProfileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserProfileServiceImpl implements UserProfileService {

    @Autowired
    private UserProfileMapper userProfileMapper;

    @Override
    public void createUserProfile(UserProfile userProfile) {
        userProfileMapper.insertUserProfile(userProfile);
    }



    @Override
    public UserProfile getUserProfileByUserId(Long userId) {
        return userProfileMapper.findUserProfileByUserId(userId);
    }
    // 修改用户简介
    @Override
    public void updateUserProfile(UserProfile userProfile) {
         userProfileMapper.updateUserProfileByUserId(userProfile);
    }
}
